#!/bin/sh

# Get all the required packages for open-sapi.
sudo apt-get install wine speech-dispatcher python-speechd wget tcl gnome-orca cabextract

mkdir $HOME/.winetrickscache
cd $HOME/.winetrickscache

# Wine does not create it's directory structure/registry until its first run.
# Winetricks fails unless this structure exisits first.

wget http://open-sapi.googlecode.com/files/wineinit.exe
wine wineinit.exe
 
wget http://open-sapi.googlecode.com/files/winetricks.sh
chmod 770 winetricks.sh
./winetricks.sh sapi51

wget http://open-sapi.googlecode.com/files/msvcp60.dll
cp -f msvcp60.dll $HOME/.wine/drive_c/windows/system32/
rm -f *
cd ..
rmdir $HOME/.winetrickscache  

spd-conf -u
exit 
